
<%@page import="com.printeverywhere.dto.Feedback"%><%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td>
				<div class="blue-text16" style="margin: 0px 0px 0px 0px">
					<s:text name="FeedbackForum.header" />
				</div>
				<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
				<div class="common-text" style="margin: 0px 0px 10px 0px">
					<s:text name="Feedbacks.para1" />
					<b><font color="green"><s:property value="userId" /> </font>
					</b>
				</div>
				<div style="margin: 0px 0px 12px 0px">

					<table cellpadding="6" cellspacing="1" width="100%">
						<tbody>
							<tr>
								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="17%"
									class="grid-header-bg grid-header-text">
									<b><s:text name="Feedbacks.Total" /></b>
								</td>
								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="17%"
									class="grid-header-bg grid-header-text">
									<b><s:text name="Feedbacks.Positive" /></b>
								</td>
								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="17%"
									class="grid-header-bg grid-header-text">
									<b><s:text name="Feedbacks.Neutral" /></b>
								</td>
								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="17%"
									class="grid-header-bg grid-header-text">
									<b><s:text name="Feedbacks.Negative" /></b>
								</td>
								<td colspan="2" align="center" width="32%"
									class="grid-header-bg grid-header-text">
									<b><s:text name="Feedbacks.CurrentFeedbackRank" /></b>
								</td>

							</tr>
							<tr>
								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="17%">
									<s:property value="totalFeedback" />
								</td>
								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="17%">
									<font color="green"><s:property value="totalPositiveFeedback" />
									</font>
								</td>
								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="17%">
									<font color="blue"><s:property value="totalNeutralFeedback" />
									</font>
								</td>
								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="17%">
									<font color="red"><s:property value="totalNegativeFeedback" />
									</font>
								</td>

								<td style="border-right: 1px solid rgb(237, 244, 255);"
									align="center" width="16%">
									<s:property value="totalCurrentFeedback" />
								</td>
								<td align="center" width="16%">
									<s:property value="rank" />
									%
								</td>
							</tr>
						</tbody>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tbody>
							<s:if test="%{feedbacks.size == 0}">
								<tr class="listrow0" align="center">
									<td width="100%" class="common-text">
										<font color="RED" size="2"><s:text name="Feedbacks.nofeedbacks" /></font>
									</td>
								</tr>
							</s:if>
							<s:else>
									<tr class="listrow1">
										<td width="100%">
											<s:if test="%{action}=='viewMyFeedback.htm'">
												<display:table name="feedbacks" pagesize="10" cellpadding="0"
													cellspacing="0" requestURI="" id="row" class="common-text">
													<display:column headerClass="Table-Head">
														<c:out value="${row_rowNum}" />
														<b class="common-bold-text"><s:text name="Feedbacks.From" /></b>
														<% if(((Feedback) row).getUserType().equalsIgnoreCase("B") == true){ %>
															Buyer
														<% }else{ %>Seller<% } %>
														<a href="#"><%=((Feedback) row).getUserByFromUserId().getUserId()%></a><b class="common-bold-text">
														<s:text name="Feedbacks.Date" /></b><%=((Feedback) row).getCreatedDate()%>
														<a href="#"><%=((Feedback) row).getItemId().getItemId()%></a><br>
														<b><font color="#009900">Praise: </font> </b><%=((Feedback) row).getMessage()%><br><br>
													</display:column>
												</display:table>
											</s:if>
											<s:else>
												<display:table name="feedbacks" pagesize="10" cellpadding="0"
													cellspacing="0" requestURI="" id="row" class="common-text">
													<display:column headerClass="Table-Head">
														<c:out value="${row_rowNum}" />
														<b class="common-bold-text"><s:text name="Feedbacks.From" /></b>
														<% if(((Feedback) row).getUserType().equalsIgnoreCase("B") == true){ %>
														Buyer
														<% }else{ %>Seller<% } %>
														<a href="#"><%=((Feedback) row).getUserByToUserId().getUserId()%></a><b class="common-bold-text">
														<s:text name="Feedbacks.Date" /></b><%=((Feedback) row).getCreatedDate()%>
														<a href="#"><%=((Feedback) row).getItemId().getItemId()%></a><br>
														<b><font color="#009900">Praise: </font> </b><%=((Feedback) row).getMessage()%><br><br>
													</display:column>
												</display:table>
											</s:else>
										</td>
									</tr>
							</s:else>
						</tbody>
					</table>

					<input name="action" value="ListUserFeedback" type="hidden">
					<input name="Page" value="1" type="hidden">
					<input name="Comments_Per_Page" value="25" type="hidden">

					<input name="User_ID_Feedback" value="test" type="hidden">
					<input name="Lang" value="en" type="hidden">
					<s:form action="%{action}" method="post">
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<tbody>
							<tr><td>&nbsp;</td></tr>
								<tr>
									<td width="100%" align="center" class="common-text">
										<s:text name="Feedbacks.para2" />
										<s:radio theme="simple" name="recordPerPage"
											value="%{recordPerPage}" list="#{25:25}" />
										<s:radio theme="simple" name="recordPerPage"
											value="%{recordPerPage}" list="#{50:50}" />
										<s:radio theme="simple" name="recordPerPage"
											value="%{recordPerPage}" list="#{100:100}" />
										<s:radio theme="simple" name="recordPerPage"
											value="%{recordPerPage}" list="#{250:250}" />
										<s:radio theme="simple" name="recordPerPage"
											value="%{recordPerPage}" list="#{500:500}" />
										<s:hidden name="userId" value="%{userId}"></s:hidden>
									</td>
								</tr>
								<tr><td>&nbsp;</td></tr>
								<tr>
									<td colspan="2" width="100%">
								<tr>
									<td align="center" >
										<table>
											<tr>
												<td align="center" class="common-text" colspan="2">
										<table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td><img src="images/middle/btn-grey-left1.gif" alt=" " width="6" height="23" /></td>
												<td class="btn-grey-middle1 "><input type="submit" name="Submit" value="Update Feedback Profile" class="submit-btn-common" /></td>
												<td><img src="images/middle/btn-grey-right1.gif" alt=" " width="6" height="23" /></td>
											</tr>
										</table>
									</td>
									<td align="center" class="common-text" colspan="2">
										<table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td><img src="images/middle/btn-grey-left1.gif" alt=" " width="6" height="23" /></td>
												<td class="btn-grey-middle1 "><input value="Reset" type="reset" class="submit-btn-common" /></td>
												<td><img src="images/middle/btn-grey-right1.gif" alt=" " width="6" height="23" /></td>
											</tr>
										</table>
									</td>

											</tr>
										</table>
									</td>
								</tr>
								<tr><td>&nbsp;</td></tr>
								<tr>
									<td width="100%" align="center" class="common-text">
										<s:text name="Feedbacks.para3" />
									</td>
								</tr>
							</tbody>
						</table>
					</s:form>
				</div>
			</td>
		</tr>
	</table>
